package perso.marcr.lst.service;

import java.io.IOException;

import javax.xml.bind.JAXBException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;

import org.springframework.oxm.XmlMappingException;
import org.xml.sax.SAXException;

import perso.marcr.lst.model.Configuration;

public interface ConfigurationService {

	/**
	 * @param jobName
	 * @param configuration
	 * @throws ParserConfigurationException
	 * @throws TransformerConfigurationException
	 * @throws TransformerException
	 * @throws XmlMappingException
	 * @throws JAXBException
	 * @throws IOException
	 */
	void save(String jobName, Configuration configuration) throws ParserConfigurationException, TransformerConfigurationException, TransformerException, XmlMappingException, JAXBException, IOException;


	/**
	 * @param jobName
	 * @return
	 * @throws ParserConfigurationException
	 * @throws SAXException
	 * @throws IOException
	 * @throws JAXBException
	 */
	Configuration load(String jobName) throws ParserConfigurationException, SAXException, IOException, JAXBException;


	/**
	 * @param jobName
	 * @param hostDirectory
	 * @throws ParserConfigurationException
	 * @throws TransformerException
	 * @throws XmlMappingException
	 * @throws JAXBException
	 * @throws IOException
	 */
	void create(String jobName, String hostDirectory) throws ParserConfigurationException, TransformerException, XmlMappingException, JAXBException, IOException;	
}
